using CLELCore.Collections;

namespace CLELCore.Assembly
{
	public class StringsStream
	{
		private Heap _strings;

		public int Size
		{
			get
			{
				return _strings.Size;
			}
		}

		public StringsStream()
		{
			_strings = new Heap();
		}

		public int Add(byte [] str)
		{
			int off = _strings.Malloc(str.Length);
			_strings.Set(off,str);
			return off;
		}
		
		public void Free(int off)
		{
			_strings.Free(off);
		}

		public int[][] Compress()
		{
			return _strings.Compress();
		}

		public byte[] Get(int off)
		{
			return _strings.Get(off);
		}
	}
}
